<template>
  <el-container class="home_container">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
      <el-menu :router="true">
        <el-submenu index="1">
          <template slot="title"><i class="el-icon-message"></i>导航</template>
          <el-menu-item index="artcile">文章列表</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-aside>

    <el-container>
      <el-header>
        <el-button type="primary" @click="logout" style="margin-top: 10px;">退出</el-button>
      </el-header>
      <el-main>
        <router-view>

        </router-view>
      </el-main>
    </el-container>

  </el-container>
</template>

<script>
export default {
  name: 'HelloWorld',
  methods:{
    logout(){
      window.sessionStorage.clear();
      console.log("退出");
      //清空token
      this.$router.push('/Login');

    }
  }
}
</script>
<style scoped>
.el-header {
  background-color: #B3C0D1;
  color: #fff;
}

.el-aside {
  color: #333;
  height: 100%;
}
.home_container{
  height: 100%;
}
</style>
